package com.hairline.hairlinemarket.service.impl;

import com.hairline.hairlinemarket.bean.MarketGoodsAttribute;
import com.hairline.hairlinemarket.bean.MarketGoodsAttributeExample;
import com.hairline.hairlinemarket.mapper.MarketGoodsAttributeMapper;
import com.hairline.hairlinemarket.service.GoodsAttributeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Author:杨小凯
 * Date:2023-04-21 8:11
 * Description:<描述>
 */
@Service
public class GoodsAttributeServiceImpl implements GoodsAttributeService {
    @Autowired
    private MarketGoodsAttributeMapper goodsAttributeMapper;
    @Override
    public List queryByGoodsId(Integer id) {

        MarketGoodsAttributeExample goodsAttributeExample = new MarketGoodsAttributeExample();
        MarketGoodsAttributeExample.Criteria criteria = goodsAttributeExample.createCriteria();
        criteria.andGoodsIdEqualTo(id);
        List<MarketGoodsAttribute> marketGoodsAttributes = goodsAttributeMapper.selectByExample(goodsAttributeExample);
        return marketGoodsAttributes;
    }
}
